package com.lc202309;

/**
 * Description:
 *
 * @Create 2023/8/31 23:36
 * @Version 1.0
 */
public class Solution344 {
    public void reverseString(char[] s) {
        int length = s.length;
        int size = length / 2;
        char tmp;
        for (int i = 0; i < size; i++) {
            if (s[i] != s[length - 1 - i]) {
                tmp = s[i];
                s[i] = s[length - 1 - i];
                s[length - 1 - i] = tmp;
            }
        }
    }
}
